﻿#region Copyright (C) Sector7 Software Studio. All rights reserved
/*******************************************************************************************
 * Creation
 *      Author:         Wolf Lai
 *      Date:           2013/7/14 星期日 13:49:11
 *      Version:        
 * Modification 
 *      Author: 
 *      Date: 
 *      Description: 
 *      Version:
 *******************************************************************************************/
#endregion
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Sector7.Framework.Enums;

namespace Sector7.Framework.Core
{
    /// <summary>
    /// 数据库字段特性
    /// </summary>
    public class DBFieldAttribute : Attribute
    {
        #region Accessor
        public DBFieldType DBFieldType
        {
            get { return m_dbFieldType; }
        }

        public DBKeyType DBKeyType
        {
            get { return m_dbKeyType; }
        }
        #endregion

        #region Structure
        public DBFieldAttribute()
        {
        }

        public DBFieldAttribute(DBFieldType dbFieldType)
        {
            m_dbFieldType = dbFieldType;
        }

        public DBFieldAttribute(DBFieldType dbFieldType, DBKeyType dbKeyType)
        {
            m_dbFieldType = dbFieldType;
            m_dbKeyType = dbKeyType;
        }
        #endregion

        #region Inner members
        private DBFieldType m_dbFieldType = DBFieldType.Normal;
        private DBKeyType m_dbKeyType = DBKeyType.Automatic;
        #endregion
    }
}
